package com.kpx.app.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;

import com.kpx.app.R;
import com.kpx.app.base.ActivityBase;
import com.kpx.app.utils.UIUtils;
import com.kpx.app.utils.uiutils.IntentUtil;
import com.kpx.app.view.TitleView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by congdy on 17/6/24.
 */

public class ActivityPayResult extends ActivityBase {
    @BindView(R.id.titleview)
    TitleView titleview;
    @BindView(R.id.btn_go_order)
    Button btnGoOrder;
    @BindView(R.id.btn_go_list)
    Button btnGoList;

    @Override
    public void initview(@Nullable Bundle savedInstanceState) {
        setContentView(R.layout.activity_pay_result);
        ButterKnife.bind(this);
        UIUtils.setNormalTitle(titleview,"支付结果");
        titleview.setRight("完成", new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
                closeAllOpenedActivityNoMain();
            }
        },R.color.white);
    }

    @Override
    public void initData() {

    }

    @Override
    public void onReceiver(Context context, Intent intent) {

    }

    @OnClick({R.id.btn_go_order, R.id.btn_go_list})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_go_order:
                closeAllOpenedActivityNoMain();
                ActivityOrderDetail.inType = 2;
                IntentUtil.gotoActivityAndFinish(ActivityPayResult.this, ActivityOrderDetail.class);
                break;
            case R.id.btn_go_list:
                closeAllOpenedActivityNoMain();
                IntentUtil.gotoActivityAndFinish(ActivityPayResult.this, ActivityOrderList.class);
                break;
        }
    }
}
